package com.zaizai.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zaizai.mapper.OrderCommdityMapper;
import com.zaizai.domain.OrderCommdity;
import com.zaizai.service.IOrderCommdityService;

/**
 * 订单商品Service业务层处理
 * 
 * @author zaiZai
 * @date 2024-10-23
 */
@Service
public class OrderCommdityServiceImpl implements IOrderCommdityService 
{
    @Autowired
    private OrderCommdityMapper orderCommdityMapper;

    /**
     * 查询订单商品
     * 
     * @param id 订单商品主键
     * @return 订单商品
     */
    @Override
    public OrderCommdity selectOrderCommdityById(Long id)
    {
        return orderCommdityMapper.selectOrderCommdityById(id);
    }

    /**
     * 查询订单商品列表
     * 
     * @param orderCommdity 订单商品
     * @return 订单商品
     */
    @Override
    public List<OrderCommdity> selectOrderCommdityList(OrderCommdity orderCommdity)
    {
        return orderCommdityMapper.selectOrderCommdityList(orderCommdity);
    }

    /**
     * 新增订单商品
     * 
     * @param orderCommdity 订单商品
     * @return 结果
     */
    @Override
    public int insertOrderCommdity(OrderCommdity orderCommdity)
    {
        return orderCommdityMapper.insertOrderCommdity(orderCommdity);
    }

    /**
     * 修改订单商品
     * 
     * @param orderCommdity 订单商品
     * @return 结果
     */
    @Override
    public int updateOrderCommdity(OrderCommdity orderCommdity)
    {
        return orderCommdityMapper.updateOrderCommdity(orderCommdity);
    }

    /**
     * 批量删除订单商品
     * 
     * @param ids 需要删除的订单商品主键
     * @return 结果
     */
    @Override
    public int deleteOrderCommdityByIds(Long[] ids)
    {
        return orderCommdityMapper.deleteOrderCommdityByIds(ids);
    }

    /**
     * 删除订单商品信息
     * 
     * @param id 订单商品主键
     * @return 结果
     */
    @Override
    public int deleteOrderCommdityById(Long id)
    {
        return orderCommdityMapper.deleteOrderCommdityById(id);
    }
}
